#pragma once
#include <vector>
#include <math.h>
#include "Bone.h"
#include "Animation.h"
using namespace std;

class Skeleton
{
	public:
		Skeleton();
		Skeleton(const Skeleton& s);
		~Skeleton();

		void Build(int aHeight, int aWeight, bool aMale, int aSpeed);

		Bone* GetMedian() {return median;};
		Bone* GetNeck() {return neck;};
		Bone* GetLeftArm() {return leftArm;};
		Bone* GetRightArm() {return rightArm;};
		Bone* GetLeftLeg() {return leftLeg;};
		Bone* GetRightLeg() {return rightLeg;};
		Bone* GetSpine() {return spine;};

		// Animation
		void StartAnimation(int aAnimation);
		void StopAnimation();
		float GetAnimationSpeed() { return animationSpeed;};
		void Tick();

		void Dump(Bone* aBone = NULL);

	private:
		Bone* median;

		Bone* neck;
		Bone* leftArm;
		Bone* rightArm;
		Bone* leftLeg;
		Bone* rightLeg;
		Bone* spine;

		// Animation
		Animation* animation;
		float animationSpeed;

		void AssignKeyFrames(AnimationFrame* animationFrame);
};

